﻿using System.Configuration;
using System.Text.RegularExpressions;

namespace Nana.Web.Compressing
{
  public class CompressionTesterElement
    : RegexElement
  {
    internal CompressionTesterElement() { }

    public CompressionTesterElement(string name, string pattern, RegexOptions flags)
      : base(name, pattern, flags)
    {
    }

    [ConfigurationProperty("compress", DefaultValue = true)]
    public bool ShouldCompress
    {
      get
      {
        return this.GetConfig(m => m.ShouldCompress);
      }
      set
      {
        this.SetConfig(m => m.ShouldCompress, value);
      }
    }
  }
}
